import React from 'react';
import ResizeTable from 'components/resize-table'
import 'styles/components/table.scss'

/**
 * 第一次中控风格更改的产物
 * 就是封装了下样式
 */
function Table(props) {
  const { onResize = () => {}, onSort = () => {}, onHide = () => {}, onRow, onRef = () => {} } = props;
  return <ResizeTable
    onResize={onResize}
    onSort={onSort}
    onHide={onHide}
    onRef={onRef}
    expandIconAsCell={false}
    {...(Object.assign({}, props, {
      className: `${props.className || ''} table ${onRow ? 'table-on-row' : ''}`
    }))}
  />
}

export default Table;
